package com.yjd.bi.fund.service;

import com.yjd.bi.fund.model.BiFundsStatisticsModel;
import com.yjd.bi.report.enums.TimeType;
import com.yjd.bi.report.model.EChartsModel;
import com.yjd.comm.base.service.IBaseService;

/**
 * <b>description</b>：资金量记录业务接口<br>
 * <b>time</b>：2016-04-14 15:09:59 <br>
 * <b>author</b>：  chenpengfei@yijeidai.com
 */
public interface IBiFundsStatisticsService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public BiFundsStatisticsModel insert(BiFundsStatisticsModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(BiFundsStatisticsModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	/**
	 * 
	 * @param timeType 维度类型
	 * @param timeFrom 统计截止时间
	 * @param field 统计字段
	 * @return
	 * @throws Exception
	 */
	public EChartsModel getDates(TimeType timeType,Long timeFrom,String field) throws Exception;
	
	/**
	 * 
	 * @param start  统计开始时间
	 * @param end 统计结束时间
	 * @return
	 * @throws Exception
	 */
	public BiFundsStatisticsModel getSummaryModel(Long start,Long end) throws Exception;
	
	/**
	 * 获取lck的统计金额
	 * @param start
	 * @param end
	 * @return
	 * @throws Exception
	 */
	public Double getLckSummary(Long start,Long end)throws Exception;
}
